//
//  HomeCollectionViewCell.m
//  网易新闻
//
//  Created by mac on 16/7/19.
//  Copyright © 2016年 xbk. All rights reserved.
//

#import "HomeCollectionViewCell.h"
#import "newsViewController.h"

@interface HomeCollectionViewCell()

@property (nonatomic,strong)newsViewController *newsVC;

@end

@implementation HomeCollectionViewCell

- (void)awakeFromNib{

    //NSLog(@"%s",__func__);
    
    UIStoryboard *stroyBoard = [UIStoryboard storyboardWithName:@"New" bundle:nil];
    
    self.newsVC = [stroyBoard instantiateInitialViewController];
    
    self.newsVC.tableView.frame = self.contentView.bounds;
    
    self.newsVC.tableView.backgroundColor = [UIColor colorWithRed:arc4random_uniform(256)/255.0 green:arc4random_uniform(256)/255.0 blue:arc4random_uniform(256)/255.0 alpha:1.0];
    
    [self addSubview:self.newsVC.tableView];
}

-(void)setUrlStr:(NSString *)urlStr{

    _urlStr = urlStr;
    //向newsViewController传值
    self.newsVC.urlStr = urlStr;
}


@end
